import Vue from 'vue'
import Router from 'vue-router'
// 首页
import Index from '../components/user/buyer/index/default.vue'
// 登录注册
import Login from '../components/login/default.vue'
import Registe from '../components/registe/default.vue'
import Found from '../components/found/default1.vue'
import Change from '../components/found/default2.vue'
// 分类
import List from '../components/user/buyer/list/default.vue'
// 详情
import Detall from '../components/user/buyer/detail/default.vue'
// 个人中心
import Personal from '../components/user/buyer/personal-center/default.vue'
import Center from '../components/user/buyer/personal-center/center.vue'//我的e购
import Order from '../components/user/buyer/personal-center/order.vue'//我的订单
import Evaluate from '../components/user/buyer/personal-center/evaluate.vue'//我的评价
import Footprint from '../components/user/buyer/personal-center/footprint.vue'//我的足迹
import Favorite from '../components/user/buyer/personal-center/favorite.vue'//我的喜欢
import Return from '../components/user/buyer/personal-center/return.vue'//退换货管理
import Sell from '../components/user/buyer/personal-center/sell'
import User from '../components/user/buyer/personal-center/user.vue'//我的账号
import Newmessage from '../components/user/buyer/notice/default.vue'//消息中心
// 购物车
import Shopping from '../components/user/buyer/shopping/default.vue'
import OrderCheck from '../components/user/buyer/shopping/default2.vue'
import Payment from '../components/user/buyer/shopping/default3.vue'
// 订单详情
import OrderId from '../components/user/buyer/personal-center/orderList/default.vue'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            name: 'Index',
            component: Index
        },
        {
            path: '/login',
            name: 'login',
            component: Login
        },
        {
            path: '/registe',
            name: 'Registe',
            component: Registe
        },
        {
            path: '/found',
            name: 'Found',
            component: Found
        },
        {
            path: '/change',
            name: 'Change',
            component: Change
        },
        {
            path: '/list',
            name: 'List',
            component: List
        },
        {
            path: '/detail',
            name: 'Detail',
            component: Detall
        },
        {
            path: '/personal',
            // name: 'Personal',
            component: Personal,
            children: [
                {
                    path: '/',
                    name: 'Center',
                    // redirect: '/center',
                    component: Center
                },
                {
                    path: '/personal/order',
                    name: 'Order',
                    component: Order,
                },
                {
                    path: '/personal/evaluate',
                    name: 'Evaluate',
                    component: Evaluate
                },
                {
                    path: '/personal/footprint',
                    name: 'Footprint',
                    component: Footprint
                },
                {
                    path: '/personal/favorite',
                    name: 'Favorite',
                    component: Favorite
                },
                {
                    path: '/personal/return',
                    name: 'Return',
                    component: Return
                }
                ,
                {
                    path: '/personal/user',
                    name: 'User',
                    component: User
                },
                {
                    path: '/personal/sell',
                    name: 'Sell',
                    component: Sell
                }
            ]
        },
        {
            path: '/newmessage',
            name: 'Notice',
            component: Newmessage,
        },
        {
            path: '/shopping',
            name: 'Shopping',
            component: Shopping
        },
        {
            path: '/orderCheck',
            name: 'OrderCheck',
            component: OrderCheck
        },
        {
            path: '/payment',
            name: 'Payment',
            component: Payment
        },
        {
            path: '/orderId',
            name: 'OrderId',
            component: OrderId,
        }
    ]
})